<?php
class FormLib
{
	public static function getStudentName()
	{
		return BaseAction::checkForm ( 'StudentName', 'POST', '姓名不能为空', array (2, 2, 64, "姓名长度错误" ), FALSE, TRUE );
	}
	public static function getFirstMobile()
	{
		return BaseAction::checkForm ( 'FirstMobile', 'POST', '手机号码不能为空', array (2, 11, 12, "手机号码长度错误" ), FALSE, TRUE );
	}
	public static function getSecondMobile()
	{
		return BaseAction::checkForm ( 'SecondMobile', 'POST', '手机号码不能为空', array (2, 11, 12, "手机号码长度错误" ), FALSE, TRUE );
	}
	public static function getBirthdayYear()
	{
		return BaseAction::checkForm ( 'BirthdayYear', 'POST', '年份不能为空', array (1, 1900, 2030, "年份格式错误" ), FALSE, TRUE );
	}
	public static function getBirthdayMonth()
	{
		return BaseAction::checkForm ( 'BirthdayMonth', 'POST', '月份不能为空', array (1, 1, 12, "月份格式错误" ), FALSE, TRUE );
	}
	public static function getWeight()
	{
		return BaseAction::checkForm ( 'Weight', 'POST', '体重不能为空', array (1, 1, 300, "体重格式错误" ), FALSE, TRUE );
	}
	
	public static function getFirstParentName()
	{
		return BaseAction::checkForm ( 'FirstParentName', 'POST', '姓名不能为空', array (2, 2, 64, "姓名长度错误" ), FALSE, TRUE );
	}
	public static function getSecondParentName()
	{
		return BaseAction::checkForm ( 'SecondParentName', 'POST', '姓名不能为空', array (2, 2, 64, "姓名长度错误" ), FALSE, TRUE );
	}
	
	public static function getParentProfession($name,$method='POST')
	{
		return BaseAction::checkForm ( $name, $method, '不能为空', array (2, 2, 64, "长度错误" ), FALSE, TRUE );
	}
	
	public static function getAddress()
	{
		return BaseAction::checkForm ( 'Address', 'POST', '不能为空', array (2, 1, 64, "长度错误" ), FALSE, TRUE );
	}
	public static function getSchool()
	{
		return BaseAction::checkForm ( 'School', 'POST', '就读园校年级不能为空', array (2, 1, 64, "就读园校年级格式错误" ), FALSE, TRUE );
	}
	public static function getHomeTel()
	{
		return BaseAction::checkForm ( 'HomeTel', 'POST#', '家庭电话不能为空', array (2, 7, 12, "家庭电话格式错误" ), FALSE, TRUE );
	}
	public static function getEmail(){
		return BaseAction::checkForm ( 'Email', 'POST#', '不能为空', array (2, 5, 64, "格式错误" ), FALSE, TRUE );
	}
	public static function getQQ(){
		return BaseAction::checkForm ( 'QQ', 'POST#', '不能为空', array (2, 5, 12, "格式错误" ), FALSE, TRUE );
	}
	
	public static function getHobby(){
		return BaseAction::checkForm ( 'Hobby', 'POST', '不能为空', array (2, 1, 64, "格式错误" ), FALSE, TRUE );
	}
	
	
	public static function getArray($name,$method='POST'){
		return BaseAction::checkForm ( $name, $method, '不能为空', array (3, 1, 64, "长度错误" ), FALSE, TRUE );
	}
	public static function getText64($name,$method='POST'){
		return BaseAction::checkForm ( $name, $method, '不能为空', array (2, 1, 64, "长度错误" ), FALSE, TRUE );
	}
	public static function getText10($name,$method='POST'){
		return BaseAction::checkForm ( $name, $method, '不能为空', array (2, 1, 10, "长度错误" ), FALSE, TRUE );
	}
	public static function getText255($name,$method='POST'){
		return BaseAction::checkForm ( $name, $method, '不能为空', array (2, 1, 255, "长度错误" ), FALSE, TRUE );
	}
	public static function getInt($name,$method='POST'){
		return BaseAction::checkForm ( $name, $method, '不能为空', array (1, 1, 100000000, "长度错误" ), FALSE, TRUE );
	}
	public static function getTinyInt4($name,$method='POST'){
		return BaseAction::checkForm ( $name, $method, '不能为空', array (1, 1, 128, "长度错误" ), FALSE, TRUE );
	}
	public static function getPinYin(){
		return BaseAction::checkForm ( 'PinYin', 'POST#', '不能为空', array (1, 0, 1, "长度错误" ), FALSE, TRUE );
	}
	
	
	
	public static function getCost($name='Cost',$method='POST#')
	{
		BaseAction::checkForm ( $name, $method, '金额不能为空', array (1, 0, 100000, "金额不对" ), FALSE, TRUE );
	}
	public static function getRegistStatus()
	{
		BaseAction::checkForm ( 'RegistStatus', 'POST#', '注册状态不能为空', array (1, 0, 6, "注册状态不对" ), FALSE, TRUE );
	}
	public static function getGradeName()
	{
		BaseAction::checkForm ( 'GradeName', 'POST', '年级不能为空', array (2, 1, 32, "年级长度错误" ), FALSE, TRUE );
	}
	public static function getNumber($name = 'Number')
	{
		BaseAction::checkForm ( $name, 'POST', '限定报名人数不能为空', array (1, 0, 500, "格式错误" ), FALSE, TRUE );
	}
	public static function getRegistedNumber($name = 'RegistedNumber')
	{
		BaseAction::checkForm ( $name, 'POST#', '已报名人数不能为空', array (1, 0, 500, "格式错误" ), FALSE, TRUE );
	}
	public static function getIsShow()
	{
		BaseAction::checkForm ( 'IsShow', 'POST#', '是否显示不能为空', array (1, 0, 1, "格式错误" ), FALSE, TRUE );
	}
	public static function getSort()
	{
		BaseAction::checkForm ( 'Sort', 'POST#', '排序不能为空', array (1, 0, 500, "格式错误" ), FALSE, TRUE );
	}
	public static function getDescription()
	{
		BaseAction::checkForm ( 'Description', 'POST#', '描述不能为空', array (2, 0, 100000, "格式错误" ), FALSE, TRUE );
	}
	
	//=================================教师====================================================
	public static function getName($name)
	{
		return BaseAction::checkForm ( $name, 'POST', '姓名不能为空', array (2, 2, 64, "姓名长度错误" ), FALSE, TRUE );
	}
	public static function getMobile($name='Mobile',$method='POST')
	{
		return BaseAction::checkForm ($name, $method, '手机号码不能为空', array (2, 11, 12, "手机号码长度错误" ), FALSE, TRUE );
	}
	public static function getSex()
	{
		return BaseAction::checkForm ( 'Sex', 'POST#', '性别不能为空', array (2, 0, 1, "性别格式错误" ), FALSE, TRUE );
	}
	public static function getNation()
	{
		return BaseAction::checkForm ( 'Nation', 'POST', '民族不能为空', array (2, 1, 10, "民族格式错误" ), FALSE, TRUE );
	}
	public static function getHeight()
	{
		return BaseAction::checkForm ( 'Height', 'POST', '身高不能为空', array (1, 50, 190, "身高格式错误" ), FALSE, TRUE );
	}
	
	public static function getPolitical()
	{
		return BaseAction::checkForm ( 'Political', 'POST', '专业不能为空', array (2, 1, 10, "专业格式错误" ), FALSE, TRUE );
	}
	
	public static function getBirthday()
	{
		return BaseAction::checkForm ( 'Birthday', 'POST', '出生年月不能为空', array (2, 1, 20, "出生年月 格式错误" ), FALSE, TRUE );
	}
	
	public static function getOrigin()
	{
		return BaseAction::checkForm ( 'Origin', 'POST', '籍贯不能为空', array (2, 1, 10, "籍贯 格式错误" ), FALSE, TRUE );
	}
	public static function getGraduation()
	{
		return BaseAction::checkForm ( 'Graduation', 'POST', '毕业时间不能为空', array (2, 1, 20, "毕业时间 格式错误" ), FALSE, TRUE );
	}
	public static function getEducation()
	{
		return BaseAction::checkForm ( 'Education', 'POST', '学历 不能为空', array (2, 1, 10, "学历  格式错误" ), FALSE, TRUE );
	}
	public static function getEducationalSystem()
	{
		return BaseAction::checkForm ( 'EducationalSystem', 'POST', '学制不能为空', array (2, 1, 10, "学制格式错误" ), FALSE, TRUE );
	}
	public static function getProfessional()
	{
		return BaseAction::checkForm ( 'Professional', 'POST', '专业 不能为空', array (2, 1, 100, "专业格式错误" ), FALSE, TRUE );
	}
	public static function getGraduateSchool()
	{
		return BaseAction::checkForm ( 'GraduateSchool', 'POST', '毕业学校 不能为空', array (2, 1, 50, "毕业学校 格式错误" ), FALSE, TRUE );
	}
	
	public static function getEnglishLevel()
	{
		return BaseAction::checkForm ( 'EnglishLevel', 'POST', '英语水平 不能为空', array (2, 1, 10, "英语水平  格式错误" ), FALSE, TRUE );
	}
	public static function getComputerLevel()
	{
		return BaseAction::checkForm ( 'ComputerLevel', 'POST', '计算机水平不能为空', array (2, 1, 10, "计算机水平 格式错误" ), FALSE, TRUE );
	}
	public static function getIntroduction()
	{
		return BaseAction::checkForm ( 'Introduction', 'POST', '自我介绍不能为空', array (2, 100, 100000, "自我介绍 长度错误" ), FALSE, TRUE );
	}
	public static function getAssessment()
	{
		return BaseAction::checkForm ( 'Assessment', 'POST', '自我评定不能为空', array (2,50, 100000, "自我介绍长度错误" ), FALSE, TRUE );
	}

}